//
//  DecodeH264Manner.h
//  VideoChat
//
//  Created by user on 2019/3/20.
//  Copyright © 2019 烧烤有点辣. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <VideoToolbox/VideoToolbox.h>

NS_ASSUME_NONNULL_BEGIN

@protocol DecodeH264Delegate <NSObject>

- (void)displayDecodedFrame:(CVImageBufferRef)imageBuffer;

@end

@interface DecodeH264Manner : NSObject

- (BOOL)initH264DecoderWithWidth:(CGFloat)width height:(CGFloat)height;

- (void)decodeNalu:(uint8_t *)frame withSize:(uint32_t)frameSize;

- (void)endVideoToolBox;

@property (nonatomic,weak) id<DecodeH264Delegate>delegate;

@end

NS_ASSUME_NONNULL_END
